package de.unistuttgart.iaaskpimonitoring.esper.processingmanagement;

import com.espertech.esper.client.EPStatement;
import java.util.List;
import java.util.Map;

public class MMOperatorNode {

	public static int nodeLatestDistributedID = 0;

	private String outputStreamName;
	private String outputMetric;
	private List<MMOperatorNode> children;
	private MMOperatorNode parent;
	private Map<String, String> parameters;
	private EPStatement statement;
	private EPStatement statementForFilter1;
	private EPStatement statementForFilter2;
		
	public void setOutputStreamName(String outputStreamName) {
		this.outputStreamName = outputStreamName;
	}

	public void setOutputMetric(String outputMetric) {
		this.outputMetric = outputMetric;
	}

	public void setChildren(List<MMOperatorNode> children) {
		this.children = children;
	}

	public void setParent(MMOperatorNode parent) {
		this.parent = parent;
	}

	public void setParameters(Map<String, String> parameters) {
		this.parameters = parameters;
	}

	public void setStatement(EPStatement statement) {
		this.statement = statement;
	}

	public String getOutputStreamName() {
		return outputStreamName;
	}

	public EPStatement getStatement() {
		return statement;
	}

	public String getOutputMetric() {
		return outputMetric;
	}

	public Map<String, String> getParameters() {
		return parameters;
	}

	public List<MMOperatorNode> getChildren() {
		return children;
	}

	public MMOperatorNode getParent() {
		return parent;
	}

	public boolean hasChildren() {
		boolean toReturn = children == null ? false : true;
		return toReturn;
	}

	public boolean hasParent() {
		boolean toReturn = parent == null ? false : true;
		return toReturn;
	}

	public EPStatement getStatementForFilter1() {
		return statementForFilter1;
	}

	public void setStatementForFilter1(EPStatement statementForFilter) {
		this.statementForFilter1 = statementForFilter;
	}

	public EPStatement getStatementForFilter2() {
		return statementForFilter2;
	}

	public void setStatementForFilter2(EPStatement statementForFilter2) {
		this.statementForFilter2 = statementForFilter2;
	}

}
